package com.region.http.client.model;

import java.lang.reflect.Method;

/**
 * @author 26225
 * @date 2024/9/2 23:31
 * @description
 */
public class CustomRequestMeta {

    private String originUrl;

    private Method method;

    /**
     * Is it a multiple instance
     * true/multi-instance, false/single-instance
     */
    private boolean status;

    /**
     * the server group name of multi-instance
     */
    private String groupName;

    /**
     * is extension
     */
    private boolean extension;

    protected CustomRequestMeta(String originUrl, Method method, boolean status, String groupName) {
        this.originUrl = originUrl;
        this.method = method;
        this.status = status;
        this.groupName = groupName;
    }

    public String getOriginUrl() {
        return originUrl;
    }

    public Method getMethod() {
        return method;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
        this.extension = true;
    }

    void setNoExtensionStatus(boolean status) {
        this.status = status;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
        this.extension = true;
    }

    void setNoExtensionGroupName(String groupName) {
        this.groupName = groupName;
    }

    public boolean isExtension() {
        return extension;
    }
}
